/**************************************************************************
** Yabet is bloging editor tool that supports many blog's formats. It is very usefull for crossposting, allows easily to
** make posts to your blogs.
**
** Copyright (C) 2010 Valery Konchin <eeexception@gmail.com>
**
** This program is free software: you can redistribute it and/or modify
**     it under the terms of the GNU General Public License as published by
**     the Free Software Foundation, either version 3 of the License, or
**     (at your option) any later version.
**
**     This program is distributed in the hope that it will be useful,
**     but WITHOUT ANY WARRANTY; without even the implied warranty of
**     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
**     GNU General Public License for more details.
**
**     You should have received a copy of the GNU General Public License
**     along with this program.  If not, see <http://www.gnu.org/licenses/>.
**************************************************************************/

#ifndef YABETLOGHANDLER_H
#define YABETLOGHANDLER_H

#include <QString>

class YabetLogHandler
{
public:
    static const int LOG_LEVEL_INFO;
    static const int LOG_LEVEL_DEBUG;
    static const int LOG_LEVEL_WARNING;
    static const int LOG_LEVEL_ERROR;
//    static const QString DEFAULT_LOG_LEVEL_FILENAME;

    YabetLogHandler(QString className);
    void infoMsg(QString msg) const;
    void debugMsg(QString msg) const;
    void warningMsg(QString msg) const;
    void errorMsg(QString msg) const;
    void msg(QString msg, int logLevel) const;

    bool isInfoEnabled() const;
    bool isDebugEnabled() const;
    bool isWarningEnabled() const;
    bool isErrorEnabled() const;
private:
    QString className;
    int logLevel;

    bool isEnabled(int level) const;
};

#endif // YABETLOGHANDLER_H
